public class Solution1037 {
    public boolean isBoomerang(int[][] points) {
        if (equals(points[0],points[1]) || equals(points[0],points[2]) || equals(points[1],points[2])){
            return false;
        }
        return (points[0][0]-points[1][0])*(points[2][1]-points[1][1])!=(points[0][1]-points[1][1])*(points[2][0]-points[1][0]);
    }

    private boolean equals(int[] a, int[] b) {
        return a[0]==b[0] && a[1]==b[1];
    }

    public static void main(String[] args) {
        System.out.println(new Solution1037().isBoomerang(new int[][]{{1,1},{2,3},{3,2}}));
    }
}
